package com.example.springboot.mybatis;

import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @desc mybatis启动服务
 * @Author wangsh
 * @date 2018/5/5 23:20
 * @return
 */
@SpringBootApplication
//如果mybatis中service实现类中加入@Transaction事务注解，需要此处添加该注解
@EnableTransactionManagement
//扫描的是mapper.xml中namespace指向值的包位置
@ComponentScan("com.example.springboot.mybatis")
public class SpringbootMybatisApplication {

	public static void main(String[] args) {
//		SpringApplication.run(SpringbootMybatisApplication.class, args);

		SpringApplication app = new SpringApplication(SpringbootMybatisApplication.class);
		//关闭打印banner
		app.setBannerMode(Banner.Mode.OFF);
		app.run(args);
	}
}
